#
# @author Wójcik Karol <wojcikk@student.agh.edu.pl>
# @licence http://www.gnu.org/copyleft/gpl.html GNU/GPL
#

class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.column :name, :string, :default => nil
      t.column :surname, :string, :default => nil
      t.column :degree, :string, :default => nil
      t.column :position, :string, :default => nil
      t.column :login, :string, :default => nil
      t.column :password, :string, :default => nil
      t.column :email, :string, :default => nil
      t.column :role, :string, :default => nil
    end
    
  end
  #User.create(:name =>'K',:surname =>'W',:login => 'admin',:password =>'fb926264d965e1e8e92fedbf2acd13417a90f7ed',:password_confirmation =>'fb926264d965e1e8e92fedbf2acd13417a90f7ed',:email => 'w@w.pl',:role=> 'admin',:degree =>'1', :position =>'1')
  
  def self.down
    drop_table :users
  end
end
